"uniform vec4 gTransform[ 4 ];\n"
"uniform vec4 gDiffuseColor;\n"
"attribute vec4 POSITION0;\n"
"attribute vec4 COLOR0;\n" //頂点カラー
"attribute vec2 TEXCOORD0;\n" //テクスチャ座標
"varying vec4 v_color;\n"
"varying vec2 v_texcoord;\n"
"void main() {\n"
"  vec4 pos;\n"
"  pos.x = dot( gTransform[ 0 ], POSITION0 );\n"
"  pos.y = dot( gTransform[ 1 ], POSITION0 );\n"
"  pos.z = dot( gTransform[ 2 ], POSITION0 );\n"
"  pos.w = dot( gTransform[ 3 ], POSITION0 );\n"
"#ifdef LINEAR_ZBUFFER\n"
"  pos.z *= pos.w;\n"
"#endif\n"
"  pos.z = 2.0 * pos.z - pos.w;\n" // OpenGL用調整 0～w → -w～w
"  gl_Position = pos;\n"
"  v_color = COLOR0.zyxw * gDiffuseColor;\n" //BGRAで来るので順番変更
"  v_texcoord = TEXCOORD0;\n"
"}\n"
